<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>vue.extend扩展实例构造器</title>
	</head>

	<body>
		<div id="app">
			<h2>vue.extend扩展实例构造器</h2>
			<hr />
			<div id="author"></div>
		</div>
		<script src="../assets/js/vue.min.js"></script>
		<script type="text/javascript">
			var authorExtend = Vue.extend({
				template: "<p><a :href='hrefUrl' target='_blank'>{{first}}</a></p>",
				data: function() {
					return {
						first: '百度一下，你就知道',
						hrefUrl: 'https://www.baidu.com'
					}
				}
			})
			//扩展构造器需要再加后才能使用
			new authorExtend().$mount('#author')
		</script>
	</body>

</html>